package com.czl.module_service.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.czl.base.binding.command.BindingCommand
import com.czl.base.binding.command.BindingConsumer
import com.czl.base.data.bean.tengyun.AssetHandleFacilityBean
import com.czl.module_service.R
import com.czl.module_service.databinding.ItemAssetHandleCardInfoBinding
import com.czl.module_service.fragment.assetHandle.AssetHandleApplyInfoFragment

class AssetHandleApplyCardInfoAdapter(private val fragment: AssetHandleApplyInfoFragment) :
    BaseQuickAdapter<AssetHandleFacilityBean, BaseDataBindingHolder<ItemAssetHandleCardInfoBinding>>(
        R.layout.item_asset_handle_card_info
    ) {

    override fun convert(
        holder: BaseDataBindingHolder<ItemAssetHandleCardInfoBinding>,
        item: AssetHandleFacilityBean,
    ) {
        holder.dataBinding?.run {
            if(item.reason == null){
                item.reason = ""
            }
            data = item
            adapter = this@AssetHandleApplyCardInfoAdapter
            executePendingBindings()
        }
    }

    val onItemClick: BindingCommand<Any> = BindingCommand(BindingConsumer {

    })
}
